home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
-
- #include "DeskLib:WimpSWIs.h"
-
- #include "Shell.Vector.h"
- #include "Shell.Extra.h"
- #include "Shell.SafeAlloc.h"
-
-
-
-
-
-
- #define COLUMN_WIDTH 8
-
-
-
-
-
- static void Shell_DoubleVerticalVectorDrawer(
- Shell_convertpoint convert,
- wimp_point rectsize,
- void *reference,
- const wimp_rect *redrawrect
- )
- {
- wimp_rect rect = *redrawrect;
- double *data = (double *) reference;
- int j;
- char s[64];
-
- Shell_ConvertToSubTextRect2( &rect, rectsize);
-
- for ( j=rect.min.y; j<=rect.max.y; j++) {
- sprintf( s, "%.2g", data[j]);
- s[ COLUMN_WIDTH-1] = '\0';
- Shell_PrintString( s, 0, rectsize.y - j*Shell_TEXTYSIZE, convert);
- }
-
- return;
- }
-
-
-
-
-
- Shell_rectblock *Shell_AddDoubleVerticalVector(
- Shell_windblock *w, int x, int y, int size,
- int forecol, int backcol, double *data
- )
- {
- Shell_rectblock *rectblock;
-
- rectblock = Shell_AddRectangle2(
- w,
- x, y - size*Shell_TEXTYSIZE,
- x + COLUMN_WIDTH * Shell_TEXTXSIZE, y,
- Shell_DoubleVerticalVectorDrawer,
- (void *) data
- );
-
-
- Shell_MakeRectIcon( rectblock, forecol, backcol, "r1");
-
- return rectblock;
- }
-
-
-